<template>
  <j-modal
    title="项目列表"
    :visible="visible"
    width="1200px"
    ok-text=""
    :footer="null"
    :ok-button-props="{ props: { disabled: true } }"
    @close="close"
  >
    <a-card :bordered="false">
      <!-- <a-table
        ref='table'
        size='middle'
        bordered
        rowKey='id'
        :scroll="{ x: 550,y:500 }"
        :columns='columns'
        :dataSource='dataSource'
        :pagination='false'
        :loading='loading'
      >
      </a-table> -->
      <!-- rowspan="2" -->
      <table border="1" style="width: 100%; font-size: 16px; text-align: center;font-weight: 700;">
        <tr style="background-color: #2b73af;color: white; font-size: 20px;">
          <th>序号</th>
          <th>年度</th>
          <th colspan="3">指标类别</th>
          <th>具体内容或金额</th>
          <th>项目类别</th>
          <th>项目名称</th>
          <th>实施单位</th>
          <th>工程地点(省市)</th>
        </tr>
        <tr>
          <td>1</td>
          <td rowspan="31">{{record.year_num}}</td>
          <td colspan="2" rowspan="2" class="bgColor">业主情况</td>
          <td>业主类别</td>
          <td>{{record.yzlb}}</td>
          <td rowspan="31">{{record.xmlb}}</td>
          <td rowspan="31">{{record.pro_name}}</td>
          <td rowspan="31">{{record.unit_name}}</td>
          <td rowspan="31">{{record.gcdd}}</td>
        </tr>
        <tr class="bghuise">
          <td>2</td>
          <td>业主名称</td>
          <td>{{record.yzmc}}</td>
        </tr>
        <tr>
          <td>3</td>
          <td rowspan="4" class="bgColor">工期情况</td>
          <td rowspan="3" class="bgColor">合同约定情况</td>
          <td>签订日期</td>
          <td>{{record.qdrq}}</td>
        </tr>
        <tr>
          <td>4</td>
          <td>开工日期</td>
          <td>{{record.kgrq}}</td>
        </tr>
        <tr>
          <td>5</td>
          <td>完工日期</td>
          <td>{{record.wgrq}}</td>
        </tr>
        <tr>
          <td>6</td>
          <td class="bgColor">实际工期</td>
          <td>实际完工日期</td>
          <td>{{record.sjwgrq}}</td>
        </tr>
        <tr class="bghuise">
          <td>7</td>
          <td></td>
          <td></td>
          <td>缺陷责任期满日</td>
          <td>{{record.qxzrrq}}</td>
        </tr>
        <tr>
          <td>8</td>
          <td class="bgColor"></td>
          <td class="bgColor"></td>
          <td>交付日期</td>
          <td>{{record.jfrq}}</td>
        </tr>
        <tr>
          <td>9</td>
          <td rowspan="2" class="bgColor">合同总价</td>
          <td colspan="2" class="bgColor">合同额</td>
          <td>{{record.hte}}</td>
        </tr>
        <tr>
          <td>10</td>
          <td colspan="2" class="bgColor">变更增加价值</td>
          <td>{{record.bgzjjz}}</td>
        </tr>
        <tr>
          <td>11</td>
          <td colspan="3" class="bgColor">实际完成产值(合同收入)</td>
          <td>{{record.sjwccz}}</td>
        </tr>
        <tr class="bghuise">
          <td>12</td>
          <td rowspan="7" class="bgColor">计价收款情况</td>
          <td rowspan="2" class="bgColor">开累验工计价</td>
          <td>合同内</td>
          <td>{{record.klygjjhtn}}</td>
        </tr>
        <tr>
          <td>13</td>
          <td>合同外</td>
          <td>{{record.klygjjhtw}}</td>
        </tr>
        <tr>
          <td>14</td>
          <td colspan="2" class="bgColor">合同约定支付比例</td>
          <td>{{record.htydzfbl}}</td>
        </tr>
        <tr>
          <td>15</td>
          <td colspan="2" class="bgColor">开累应收工程款</td>
          <td>{{record.klysgck}}</td>
        </tr>
        <tr>
          <td>16</td>
          <td colspan="2" class="bgColor">实际收工程款</td>
          <td>{{record.sjsgck}}</td>
        </tr>
        <tr class="bghuise">
          <td>17</td>
          <td rowspan="2" class="bgColor">已完未验</td>
          <td>合同内</td>
          <td>{{record.ywwyhtn}}</td>
        </tr>
        <tr>
          <td>18</td>
          <td>合同外</td>
          <td>{{record.ywwyhtw}}</td>
        </tr>
        <tr>
          <td>19</td>
          <td rowspan="12" class="bgColor">财务账面数据</td>
          <td colspan="2" class="bgColor">账面已确认营业收入</td>
          <td>{{record.zmyqryysr}}</td>
        </tr>
        <tr>
          <td>20</td>
          <td colspan="2" class="bgColor">账面已确认营业成本</td>
          <td>{{record.zmyqryycb}}</td>
        </tr>
        <tr>
          <td>21</td>
          <td rowspan="3" class="bgColor">资金收入</td>
          <td>已收工程款</td>
          <td>{{record.zjsrysgck}}</td>
        </tr>
        <tr class="bghuise">
          <td>22</td>
          <td>公司垫资</td>
          <td>{{record.zjsrgsdz}}</td>
        </tr>
        <tr>
          <td>23</td>
          <td>其他</td>
          <td>{{record.zjsrqt}}</td>
        </tr>
        <tr>
          <td>24</td>
          <td colspan="2" class="bgColor">资金支出</td>
          <td>{{record.zjzc}}</td>
        </tr>
        <tr>
          <td>25</td>
          <td rowspan="3" class="bgColor">应收款项</td>
          <td>应收账款</td>
          <td>{{record.yfkx_yszk}}</td>
        </tr>
        <tr>
          <td>26</td>
          <td>其他应收款</td>
          <td>{{record.yfkx_qtyfk}}</td>
        </tr>
        <tr class="bghuise">
          <td>27</td>
          <td>预付账款</td>
          <td>{{record.yfkx_yfzk}}</td>
        </tr>
        <tr>
          <td>28</td>
          <td rowspan="3" class="bgColor">应付款项</td>
          <td>应付账款</td>
          <td>{{record.yskx_yfzk}}</td>
        </tr>
        <tr>
          <td>29</td>
          <td>其他应付款</td>
          <td>{{record.yskx_qtysk}}</td>
        </tr>
        <tr>
          <td>30</td>
          <td>预收账款</td>
          <td>{{record.yskx_yszk}}</td>
        </tr>
        <tr>
          <td>31</td>
          <td colspan="3" class="bgColor">投资/总承包项目</td>
          <td>{{record.tzzcbxm}}</td>
        </tr>
        <tr style="background-color: #74787a; color:white">
          <td colspan="5">总计</td>
          <td>{{record.hj}}</td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
        </tr>
      </table>
      <!-- table区域-end -->
    </a-card>
  </j-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { httpAction, getAction, postAction, deleteAction } from '@/api/manage'
import columns from './Checkcolumns'

export default {
  name: 'tempCheck',
  mixins: [JeecgListMixin],
  components: {},
  data() {
    return {
      // 表头
      columns: columns(this),
      queryParam: {},
      url: {
        list: '/performcheck/checkProjectInfo/queryProject',
      },
      visible: false,
      dataSource: [],
      record:{},
      disableMixinCreated:true
    }
  },
  computed: {},
  methods: {
    check(record) {
        this.record = record;
      this.dataSource = []
      this.queryParam.id = Object.assign({}, record).id
      console.log(record)
      this.loadData()
      this.visible = true
    },
    close() {
      this.visible = false
    },
    mergeCells(text, data, key, index) {
      // 上一行该列数据是否一样
      if (index !== 0 && text === data[index - 1][key]) {
        return 0
      }
      let rowSpan = 1
      // 判断下一行是否相等
      for (let i = index + 1; i < data.length; i++) {
        if (text !== data[i][key]) {
          break
        }
        rowSpan++
      }
      return rowSpan
    },
    mergeColSpan(text, record, index) {},
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.bgColor{
    background-color:#2b73af;
    color: white;
}
.bghuise{
    background-color: #dbe3e7;
}
</style>